package org.yxing.palpalgps;

import android.app.TabActivity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.widget.TextView;

public class AbstractTabActivity extends TabActivity {
    private ActionBar mActionBar;
    
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.setContentView(R.layout.tab_content);
        
        mActionBar = (ActionBar) findViewById(R.id.action_bar);
    }
    
    public void setTitle(String text) {
        ((TextView) findViewById(R.id.titleView)).setText(text);
    }
    
    public void addActionBarItem(int resId) {
        mActionBar.addItem(resId);
    }
    
    public void addActionBarItem(ActionBar.Type type) {
        mActionBar.addItem(type);
    }
    
    public void clearActionBarItem() {
        mActionBar.clear();
    }
    
    public ActionBar getActionBar() {
        return mActionBar;
    }
}
